package fem2.material;

/**
 * TODO
 * 
 * @author hbui
 * 
 */
public class ExponentialSofteningRule implements FluencyCriteria {

	private double e0;
	private double ef;

	public ExponentialSofteningRule(double e0, double ef) {
		this.e0 = e0;
		this.ef = ef;
	}

	@Override
	public double computeFluencyValue(double alpha) {
		return e0 * Math.exp(-(alpha - e0) / ef);
	}

	@Override
	public double computeFluencyDerivative(double alpha) {
		return -computeFluencyValue(alpha) / ef;
	}

}
